<div class="title">
  <h1><%=h @player.name %></h1>
</div>

<div class="content">
  <% if @player.palaces.count > 0 %>
    <h2>Paläste</h2>
    <ul>
      <% for palace in @player.palaces %>
        <li><%= link_to palace, player_palace_path(@player, palace) %></li>
      <% end %>
    </ul>
  <% end %>
  <% if @player.heros.count > 0 %>
    <h2>Helden</h2>
    <ul>
      <% for hero in @player.heros %>
        <li><%= link_to hero, player_hero_path(@player, hero) %></li>
      <% end %>
    </ul>
  <% end %>
</div>

<% content_for :navigation do %>
  <li>
    <%= link_to 'Manage heros', player_heros_path(@player) %>
  </li>
  <li>
    <%= link_to 'Manage palaces', player_palaces_path(@player) %>
  </li>
  <li>
    <%= link_to 'Manage deliveries', player_deliveries_path(@player) %>
  </li>
  <li>
    <%= link_to 'Edit', edit_player_path(@player) %>
  </li>
<% end %>
